package com.hongpu.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hongpu.domain.CoolTowerEmployeeSalaryProjectRelationship;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
* @author Michael zhang
* @description 针对表【cool_tower_employee_salary_project_relationship(冷却塔安装人员薪资与安装项目关联关系)】的数据库操作Mapper
* @createDate 2025-06-12 08:52:59
* @Entity generator.domain.CoolTowerEmployeeSalaryProjectRelationship
*/
public interface CoolTowerEmployeeSalaryProjectRelationshipMapper extends BaseMapper<CoolTowerEmployeeSalaryProjectRelationship> {

    /**
     * 根据人员ID查询所在的项目列表
     */
    public IPage<CoolTowerEmployeeSalaryProjectRelationship> selectPage(@Param("ipage") IPage ipage, @Param("employeeId") Long employeeId);

    /**
     * 获取当前项目的基本工资
     */
    public BigDecimal selectSalary(@Param("coolTowerProjectId") Long coolTowerProjectId,@Param("coolTowerEmployeeId") Long coolTowerEmployeeId);

    /**
     * 从数据库中获取两个日期夸几个月
     */
    public int selectMonth(@Param("startDate") String startDate,@Param("endDate") String endDate);
    /**
     * 根据人员ID和项目ID查询数据库中是否已经存在数据
     */
    public boolean  isExistData(@Param("coolTowerEmployeeId") Long coolTowerEmployeeId,@Param("coolTowerProjectId") Long coolTowerProjectId);


}




